/**
 * @format
 * @flow strict-local
 */
import RNDateTimePicker from './datetimepicker';
export * from '@react-native-community/datetimepicker/src/eventCreators';
// export {DateTimePickerAndroid} from '@react-native-community/datetimepicker/src/DateTimePickerAndroid';
import DateTimePickerAndroide from './picker/NativeDateTimePickerAndroid'
import TimePickerAndroids from './picker/NativeTimePickerAndroid'
// (DateTimePickerAndroid as any).dateSetAction = 'dateSetAction'
// (DateTimePickerAndroid as any).dismissedAction = 'dismissedAction'
const DatePickerAndroid = {
    open: (options)=>{
        return DateTimePickerAndroide.open({
            mode: options.mode,
            minDate: options.minDate ? new Date(options.minDate).toISOString() : null,
            maxDate: options.maxDate ? new Date(options.maxDate).toISOString() : null,
            date: options.date ? new Date(options.date).toISOString() : null,
        })
    },
    dateSetAction: 'dateSetAction',
    dismissedAction: 'dismissedAction'
}

const TimePickerAndroid = {
    open: TimePickerAndroids.open,
    timeSetAction: 'timeSetAction',
    dismissedAction: 'dismissedAction'
}

const DatePickerIOS = ()=>{return <></>}
export {
    DatePickerAndroid,
    TimePickerAndroid,
    DatePickerIOS
}

export default RNDateTimePicker;
